﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SessionToViewSate.aspx.cs"
    Inherits="WebAppDemo.SessionToViewSate" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <ul>
            初始化：
            <asp:TextBox ID="txtInit" runat="server"></asp:TextBox>
            <asp:Button ID="btnInit" runat="server" Text="Init" onclick="btnInit_Click" />
        </ul>
        <ul>
            改变值：
            <asp:TextBox ID="txtChange" runat="server"></asp:TextBox>
            <asp:Button ID="btnChange" runat="server" Text="Change" 
                onclick="btnChange_Click" />
        </ul>
        <ul>
            <asp:Button ID="btnShow" runat="server" Text="Show" onclick="btnShow_Click" />
            <ul>
                显示ViewState值：
                <asp:TextBox ID="txtViewState" runat="server"></asp:TextBox>
            </ul>
            <ul>
                显示Session值：
                <asp:TextBox ID="txtSession" runat="server"></asp:TextBox>
            </ul>
            <ul>
                显示Session2值：
                <asp:TextBox ID="txtSession2" runat="server"></asp:TextBox>
            </ul>
        </ul>
    </div>
    </form>
</body>
</html>
